import static org.junit.Assert.*;

import org.junit.Test;

import GoldenEagle.MenuSystem;
import GoldenEagle.Order;


public class TestMenuSystem {

	@Test
	public void testMenuSystem() {
		MenuSystem ms = new MenuSystem(true);
		
		
		assertTrue(ms != null);
		
	}

	@Test
	public void testAddRemoveOrder() {
		MenuSystem ms = new MenuSystem(true);
		//Test Input Bug sequence
		ms.addOrder(new String[]{"2","10","4","George","1","2"});
		Order o = ms.addOrder(new String[]{"2","10","3","4"});
		
		assertTrue(o.getTable() == 10);
		assertTrue(o.getStaffName().equals("George"));
		o.display();
		
		
		ms.removeOrder(new String[]{"3","10"});
		
		assertTrue(ms.getOrderCount() == 0);
		
	}
	@Test
	public void testBilling()
	{
		MenuSystem ms = new MenuSystem(true);
		//Test Input Bug sequence
		ms.addOrder(new String[]{"2","10","4","George","1","2"});
		Order o = ms.addOrder(new String[]{"2","10","3","4"});
		ms.billing(new String[]{"4","10"});
		
		assertTrue(ms.getBillCount() != 0);
	}


}
